﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FinosLibrary;
using FinosServiceLibrary.Server;
namespace BattleShip {
    [MessageProcess]
    public class Chat : ServerLogic {
        [AutoWire]
        public DataClassesDataContext database;
        [MessageMethod]
        public void chat(string client,string msg) {
            User userInfo = database.Users.Single(user => user.connId == client);
            broadcast("chat", "[" + userInfo.name + "] " + msg);
        }
    }
}
